<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模板 过滤器</title>
</head>
<body>
<ul>
    {% for i in s1 %}
    {% if forloop.counter|divisibleby:2 %}
    <li style="color:red">
        <a>{{forloop.counter}}:{{i.sname}}--{{i.scontend}}--{{i.sgrade}}</a>
    </li>
    {% else%}
    <li style="color:blue">
        <a>{{forloop.counter}}:{{i.sname}}--{{i.scontend}}--{{i.sgrade}}</a>
    </li>
    {% endif %}
    {%endfor%}
</ul>
<h1>123{#   变量、标签都可以注释 #}</h1>

</body>
</html>